package edu.ncut.vod.smart.jrsoft.chart;

import org.jfree.data.time.Minute;
import org.jfree.data.time.TimeSeries;

/**
 * @author oracle
 *
 * TODO To ���Ҫ����ʱ��˳�������ͼ
 * 
 */
public class TimeList {
	private TimeSeries timeSeries=null;
	/**
	 * ���캯�������ݼ�����
	 * @param str ��ݼ���������
	 */
	public TimeList(String str){
		try{
			this.timeSeries=new TimeSeries(str,Class.forName("org.jfree.data.time.Minute"));
		}catch(Exception e){
			System.out.println("here");
			System.out.println(e);
		}
	}
	/**
	 * ��ӻ�����ͼ��ʱ�� ��ֵ
	 * @param year		��
	 * @param month		��
	 * @param date		��
	 * @param hour		Сʱ
	 * @param minute	����
	 * @param value		ֵ
	 */
	public void add(int year,int month,int date,int hour,int minute,double value){
		this.timeSeries.add(new Minute(minute,hour,date,month,year),value);
	}
	/**
	 * ����ʱ�伯�����
	 */
	public void clear(){
		this.timeSeries.clear();
	}
	/**
	 * ��ȡ��ʱ�伯
	 * @return ʱ�伯
	 */
	public  TimeSeries getTimeSeries(){
		if(this.timeSeries==null){
			System.out.println("null");
		}
		return this.timeSeries;
	}

}
